<template>
  <div>
    <h1>Children</h1>
    <SonVue></SonVue>
  </div>
</template>

<script>
import SonVue from './Son.vue'
export default {
  mounted() {
    console.log(this.$parent.num)
    //可以直接使用$parent获取到父组件的实例对象取值
  },
  components: {
    SonVue,
  },
}
</script>

<style></style>
